package org.spring.batch.ch02;

import java.util.Date;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.batch.core.StepContribution;
import org.springframework.batch.core.scope.context.ChunkContext;
import org.springframework.batch.core.step.tasklet.Tasklet;
import org.springframework.batch.repeat.RepeatStatus;
/**
 * 一个最简单的任务
 * @author wangjie
 *
 */
public class SimpleJobTasklet implements Tasklet{
	
	private final Logger logger = LoggerFactory.getLogger(getClass());

	@Override
	public RepeatStatus execute(StepContribution contribution,
			ChunkContext chunkContext) throws Exception {
		logger.info("=====>>SimpleJobTasklet is running, time:" + new Date());
		
		return RepeatStatus.FINISHED;
	}

}
